Repository navigation
Show the Hub's version, OS, uptime and activity (v1.66.0) - #145
Merged
Merged
Conversation
The Hub now describes itself to authenticated clients through a new hub.info.request / hub.info.response pair. Only signed-in clients get it; nothing is added to the pre-auth hello. AuthOk now carries hubVersion. A Hub older than 1.66.0 leaves it out, so the client reports it as too old right away instead of timing out on a request that Hub would drop. Surfaced in three places, all built from the same hubInfoSections: - omnyshell hub info [--json] - a Hub tab in the dashboard (key 5) - the :hub local command; :info also shows the Hub version Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes: - The dashboard drops the Hub description on every connect or login, so a reconnect, possibly to a different Hub, no longer shows the previous Hub's data under the new URL. - ClientRuntime.hubInfo() reports HubTooOldException and not-connected through the returned future instead of throwing synchronously. - The broker captures the Hub's platform once instead of on every request. - One shared stripControlChars (shared/utils/terminal_text.dart) replaces two private copies. - One scroll helper is shared by the node Info and Hub tabs. - The withLocalDefaults doc lists :hub; the CHANGELOG notes the DashboardBackend.hubInfo() addition for embedders. Tests: - Broker: the login reply carries hubVersion; an unauthenticated hub.info.request is refused; uptime runs on the Hub clock. - Live Hub: session counts are shared, tunnel counts are per caller; a dropped connection fails a pending hubInfo. - The real `omnyshell hub info` binary: text sections, --json, and a rejected token. - Dashboard: a reconnect never shows the previous Hub's description. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A signed-in client can now see what the Hub is running. The information is shown in three places:
omnyshell hub infoprints it as text;--jsonprints it as JSON for scripts and bug reports.5, or Tab from AI). Scrolls, andrrefreshes it. If a refresh fails, the last result stays on screen.:hubprints it inside a session.:infoalso gains aHub Versionline.What it shows:
How
hub.info.request/hub.info.response, correlated byrequestId, carrying a newHubInfoentity. The entity is web-safe and exported from both client barrels.hello, so a peer that can merely reach the port can't use this to fingerprint the Hub.AuthOknow carries an optionalhubVersion. Hubs older than 1.66.0 leave it out. Without it the client knows the Hub can't answer and throwsHubTooOldExceptionimmediately. Otherwise it would wait 20 seconds for a reply, because old Hubs silently drop unknown message types.hubInfoSections/hubInfoLinesrender the rows for the CLI,:huband the dashboard, so all three show the same thing. Text printed to the terminal has control characters removed._renderInfoRows, shared by the node Info tab and the Hub tab.Not included
Tests
AuthOk.hubVersionboth present and absent.hubVersion) raisesHubTooOldExceptionand no request is sent.:hubsections, control-character stripping, old Hub; theHub Versionline in:info.omnyshell hub info(text and--json) against a locally started Hub.dart analyzeis clean anddart testpasses (1557).Release
The version moves to 1.66.0 in
pubspec.yamlandlib/src/version.dart(1.65.0 is tagged), with a CHANGELOG section. The README anddoc/protocol.mdare updated.🤖 Generated with Claude Code